package cn.jetpiece.cloud.joss.app.modular.object.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 桶
 * </p>
 *
 * @author XuJZ
 * @since 2020-09-05
 */
@TableName("oss_bucket")
public class Bucket implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 桶名称
     */
    @TableId(value = "bucket_name", type = IdType.INPUT)
    private String bucketName;

    /**
     * 服务商UUID
     */
    @TableField("provider_id")
    private String providerId;

    /**
     * 域UUID
     */
    @TableField("region_id")
    private String regionId;

    /**
     * 存储类型UUID
     */
    @TableField("storage_class_id")
    private String storageClassId;

    /**
     * 数据冗余类型(1:单可用区,2:多可用区)
     */
    @TableField("data_redundancy_type")
    private Integer dataRedundancyType;

    /**
     * 数据权限(1:私有,2:公共可读,3:公共读写)
     */
    @TableField("acl")
    private Integer acl;

    /**
     * 启用
     */
    @TableField(value = "is_enable", fill = FieldFill.INSERT)
    private Integer isEnable;

    /**
     * 删除
     */
    @TableField(value = "is_del", fill = FieldFill.INSERT)
    private Integer isDel;

    /**
     * 新增时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    private Date updateTime;


    public String getProviderId() {
        return providerId;
    }

    public void setProviderId(String providerId) {
        this.providerId = providerId;
    }

    public String getRegionId() {
        return regionId;
    }

    public void setRegionId(String regionId) {
        this.regionId = regionId;
    }

    public String getStorageClassId() {
        return storageClassId;
    }

    public void setStorageClassId(String storageClassId) {
        this.storageClassId = storageClassId;
    }

    public String getBucketName() {
        return bucketName;
    }

    public void setBucketName(String bucketName) {
        this.bucketName = bucketName;
    }

    public Integer getDataRedundancyType() {
        return dataRedundancyType;
    }

    public void setDataRedundancyType(Integer dataRedundancyType) {
        this.dataRedundancyType = dataRedundancyType;
    }

    public Integer getAcl() {
        return acl;
    }

    public void setAcl(Integer acl) {
        this.acl = acl;
    }

    public Integer getIsEnable() {
        return isEnable;
    }

    public void setIsEnable(Integer isEnable) {
        this.isEnable = isEnable;
    }

    public Integer getIsDel() {
        return isDel;
    }

    public void setIsDel(Integer isDel) {
        this.isDel = isDel;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return "Bucket{" +
                "providerId=" + providerId +
                ", regionId=" + regionId +
                ", storageClassId=" + storageClassId +
                ", bucketName=" + bucketName +
                ", dataRedundancyType=" + dataRedundancyType +
                ", acl=" + acl +
                ", isEnable=" + isEnable +
                ", isDel=" + isDel +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                "}";
    }
}
